package com.smh.service.impl;

import com.smh.dao.UserDao;
import com.smh.model.User;
import com.smh.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserDao userDao;

    public boolean add(User user){
        return userDao.add(user);
    }

    public boolean delete(String idcardNo){
        return userDao.delete(idcardNo);
    }

    @Override
    public boolean update(User user) {
        return userDao.update(user);
    }

    public List<User> search(){
        return userDao.search();
    }
}
